For this I’m going to use January-March as an
example. First running the PCA with cor = FALSE to use
covariances.
## Importance of components:
## Comp.1 Comp.2 Comp.3 Comp.4 Comp.5
## Standard deviation 0.1710891 0.1163601 0.08196179 0.07216938 0.06156387
## Proportion of Variance 0.4200278 0.1942860 0.09639543 0.07473766 0.05438579
## Cumulative Proportion 0.4200278 0.6143138 0.71070919 0.78544685 0.83983264
## Comp.6 Comp.7 Comp.8 Comp.9 Comp.10
## Standard deviation 0.05453121 0.04883235 0.04243624 0.03455626 0.02939262
## Proportion of Variance 0.04267012 0.03421755 0.02584088 0.01713511 0.01239682
## Cumulative Proportion 0.88250276 0.91672031 0.94256119 0.95969630 0.97209312
## Comp.11 Comp.12 Comp.13 Comp.14
## Standard deviation 0.02789280 0.023865597 0.021812543 0.008711180
## Proportion of Variance 0.01116395 0.008172938 0.006827256 0.001088899
## Cumulative Proportion 0.98325707 0.991430010 0.998257266 0.999346165
## Comp.15
## Standard deviation 0.0067502107
## Proportion of Variance 0.0006538351
## Cumulative Proportion 1.0000000000
Then we use the PC scores to plot the map… for PC1
and PC2
We take the loadings of each of the species (PC1) and plot them. Loadings are the association coefficients between the components and the variables. They are the covariances/correlations between the original variables and the unit-scaled components. They are directly comparable with association coefficients computed between the variables— covariances, correlations and other scalar products. See: link1 and link2.
And now we look at the correlation coefficients of the Spearman correlation analysis between the PC scores and the individual species model outputs
First, I’m going to use January-March as an example.
PCA is ran with cor = TRUE to use correlation.
## Importance of components:
## Comp.1 Comp.2 Comp.3 Comp.4 Comp.5
## Standard deviation 2.1148752 1.3451660 1.11632727 1.05605708 1.0274288
## Proportion of Variance 0.2981798 0.1206314 0.08307911 0.07435044 0.0703740
## Cumulative Proportion 0.2981798 0.4188112 0.50189034 0.57624078 0.6466148
## Comp.6 Comp.7 Comp.8 Comp.9 Comp.10
## Standard deviation 0.95671368 0.90996973 0.87138350 0.76636589 0.76241288
## Proportion of Variance 0.06102007 0.05520299 0.05062061 0.03915445 0.03875156
## Cumulative Proportion 0.70763485 0.76283784 0.81345846 0.85261290 0.89136446
## Comp.11 Comp.12 Comp.13 Comp.14 Comp.15
## Standard deviation 0.74129612 0.6324702 0.52313325 0.49128616 0.40615777
## Proportion of Variance 0.03663466 0.0266679 0.01824456 0.01609081 0.01099761
## Cumulative Proportion 0.92799912 0.9546670 0.97291159 0.98900239 1.00000000
Then we use the PC scores to plot the map… for PC1
and PC2
And we take the loadings of each of the species (PC1) and plot them…
And now we look at the correlation coefficients of the Spearman correlation analysis between the PC scores and the individual species model outputs
## Importance of components:
## Comp.1 Comp.2 Comp.3 Comp.4 Comp.5
## Standard deviation 2.1147394 1.5829444 1.14210145 1.08637728 1.0503671
## Proportion of Variance 0.2981415 0.1670475 0.08695972 0.07868104 0.0735514
## Cumulative Proportion 0.2981415 0.4651890 0.55214876 0.63082980 0.7043812
## Comp.6 Comp.7 Comp.8 Comp.9 Comp.10
## Standard deviation 0.97085588 0.85896438 0.75876932 0.71988798 0.68392830
## Proportion of Variance 0.06283741 0.04918799 0.03838206 0.03454925 0.03118386
## Cumulative Proportion 0.76721861 0.81640660 0.85478866 0.88933790 0.92052177
## Comp.11 Comp.12 Comp.13 Comp.14 Comp.15
## Standard deviation 0.52565400 0.51603670 0.50922905 0.47539579 0.40528031
## Proportion of Variance 0.01842081 0.01775292 0.01728762 0.01506674 0.01095014
## Cumulative Proportion 0.93894257 0.95669550 0.97398311 0.98904986 1.00000000
Then we use the PC scores to plot the map… for PC1
Loadings…
Spearman correlation coefficients…
## Importance of components:
## Comp.1 Comp.2 Comp.3 Comp.4 Comp.5
## Standard deviation 1.8294287 1.4536007 1.3180366 1.07972466 1.00980730
## Proportion of Variance 0.2231206 0.1408637 0.1158147 0.07772036 0.06798072
## Cumulative Proportion 0.2231206 0.3639843 0.4797990 0.55751937 0.62550009
## Comp.6 Comp.7 Comp.8 Comp.9 Comp.10
## Standard deviation 0.91561933 0.88895072 0.86698515 0.79965718 0.78800242
## Proportion of Variance 0.05589058 0.05268223 0.05011088 0.04263011 0.04139652
## Cumulative Proportion 0.68139067 0.73407290 0.78418378 0.82681389 0.86821041
## Comp.11 Comp.12 Comp.13 Comp.14 Comp.15
## Standard deviation 0.73481584 0.67507467 0.63450442 0.56437949 0.50994481
## Proportion of Variance 0.03599695 0.03038172 0.02683972 0.02123495 0.01733625
## Cumulative Proportion 0.90420736 0.93458908 0.96142881 0.98266375 1.00000000
Then we use the PC scores to plot the map… for PC1
Loadings…
Spearman correlation coefficients…
## Importance of components:
## Comp.1 Comp.2 Comp.3 Comp.4 Comp.5
## Standard deviation 2.1412468 1.3798657 1.18067723 1.05164630 0.97617360
## Proportion of Variance 0.3056625 0.1269353 0.09293325 0.07373066 0.06352766
## Cumulative Proportion 0.3056625 0.4325978 0.52553107 0.59926173 0.66278939
## Comp.6 Comp.7 Comp.8 Comp.9 Comp.10
## Standard deviation 0.95342807 0.91205326 0.88587901 0.80324747 0.7529164
## Proportion of Variance 0.06060167 0.05545608 0.05231877 0.04301377 0.0377922
## Cumulative Proportion 0.72339107 0.77884714 0.83116592 0.87417968 0.9119719
## Comp.11 Comp.12 Comp.13 Comp.14 Comp.15
## Standard deviation 0.65203151 0.57032647 0.45347015 0.44000201 0.41324010
## Proportion of Variance 0.02834301 0.02168482 0.01370901 0.01290678 0.01138449
## Cumulative Proportion 0.94031489 0.96199971 0.97570872 0.98861551 1.00000000
Then we use the PC scores to plot the map… for PC1
Loadings…
Spearman correlation coefficients…